import BasicLayout from '@/layouts/basic-layout'

const meta = {
  auth: true
}

export default {
  path: '/sourcing',
  name: 'sourcing',
  redirect: {
    name: 'sourcing'
  },
  meta,
  component: BasicLayout,
  children: [
    {
      path: 'demand-manage/inquiry',
      name: 'demandInquiry',
      meta: {
        auth: true, // 是否校验权限
        title: '需求管理'
      },
      component: () => import('@/pages/sourcing/demand-manage/inquiry')
    },
    {
      path: 'demand-manage/order',
      name: 'demandOrder',
      meta: {
        auth: true, // 是否校验权限
        title: '需求管理'
      },
      component: () => import('@/pages/sourcing/demand-manage/order')
    },
    {
      path: 'purchase-inquiry/inquiry',
      name: 'inquiry',
      meta: {
        auth: true, // 是否校验权限
        title: '采购询价'
      },
      component: () => import('@/pages/sourcing/purchase-inquiry/inquiry')
    },
    {
      path: 'purchase-inquiry/order',
      name: 'order',
      meta: {
        auth: true, // 是否校验权限
        title: '采购询价'
      },
      component: () => import('@/pages/sourcing/purchase-inquiry/order')
    },
    {
      path: 'purchase-inquiry/quotation-record',
      name: 'bidRecord',
      meta: {
        auth: true,
        title: '定标记录查询'
      },
      component: () => import('@/pages/sourcing/quotation-record/index.vue')
    },
    {
      path: 'demand-manage/purchase-detail',
      name: 'demandPurchaseDetail',
      meta: {
        auth: false,
        title: '需求报价详情'
      },
      component: () => import('@/pages/sourcing/purchase-detail/quote-info')
    },
    {
      path: 'demand-manage/calibration-detail',
      name: 'demandCalibrationDetail',
      meta: {
        auth: false,
        title: '客户需求/客户询价定标编辑'
      },
      component: () => import('@/pages/sourcing/purchase-detail/calibration-info/inquiry')
    },
    {
      path: 'purchase-inquiry/purchase-detail',
      name: 'purchaseDetail',
      meta: {
        auth: false,
        title: '采购报价详情'
      },
      component: () => import('@/pages/sourcing/purchase-detail/quote-info')
    },
    {
      path: 'purchase-inquiry/calibration-detail',
      name: 'calibrationDetail',
      meta: {
        auth: false,
        title: '客户需求/客户询价定标查看'
      },
      component: () => import('@/pages/sourcing/purchase-detail/calibration-info/inquiry')
    },
    {
      path: 'purchase-inquiry/order-calibration',
      name: 'orderCalibration',
      meta: {
        auth: false,
        title: '订货定标编辑'
      },
      component: () => import('@/pages/sourcing/purchase-detail/calibration-info/order')
    },
    {
      path: 'purchase-inquiry/order-calibration-view',
      name: 'orderCalibrationView',
      meta: {
        auth: false,
        title: '订货定标查看'
      },
      component: () => import('@/pages/sourcing/purchase-detail/calibration-info/order/view')
    },
    {
      path: 'purchase-inquiry/order/product-contract',
      name: 'productContract',
      meta: {
        auth: false,
        title: '供应商页面'
      },
      component: () => import('@/pages/sourcing/purchase-inquiry/order/product-contract/index')
    },
    {
      path: 'purchase-inquiry/order/pushDownPage',
      name: 'pushDownPage',
      meta: {
        auth: false,
        title: '采购订单'
      },
      component: () => import('@/pages/sourcing/purchase-inquiry/order/pushDownPage/index')
    },
    {
      path: 'purchase-inquiry/self-purchase',
      name: 'selfPurchase',
      meta: {
        title: '自进货询价'
      },
      component: () => import('@/pages/sourcing/purchase-inquiry/self-purchase')
    },
    {
      path: 'purchase-inquiry/self-purchase/quotation-info',
      name: 'selfPurchaseQuotationInfo',
      meta: {
        title: '自进货询价报价信息'
      },
      component: () => import('@/pages/sourcing/purchase-detail/self-purchase/quotation')
    },
    {
      path: 'purchase-inquiry/self-purchase/calibration',
      name: 'selfPurchaseCalibration',
      meta: {
        title: '自进货定标信息'
      },
      component: () => import('@/pages/sourcing/purchase-detail/self-purchase/calibration')
    },
    {
      path: 'purchase-inquiry/self-purchase/calibration/view',
      name: 'selfPurchaseCalibrationView',
      meta: {
        title: '自进货定标信息查看'
      },
      component: () => import('@/pages/sourcing/purchase-detail/self-purchase/calibration/view')
    },
    {
      path: 'purchase-inquiry/self-purchase/generate-order',
      name: 'selfPurchaseGenerateOrder',
      meta: {
        auth: false,
        title: '自进货采购订单'
      },
      component: () => import('@/pages/sourcing/purchase-inquiry/self-purchase/generate-order')
    },
  ]
}
